package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the kq_overwork database table.
 * 
 */
@Entity
@Table(name="kq_overwork")
@NamedQuery(name="KqOverwork.findAll", query="SELECT k FROM KqOverwork k")
public class KqOverwork implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="O_ID")
	private int oId;

	@Column(name="O_BOU")
	private String oBou;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="O_DATE")
	private Date oDate;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="O_SDATE")
	private Date oSdate;

	@Temporal(TemporalType.DATE)
	@Column(name="O_JIE")
	private Date oJie;

	@Temporal(TemporalType.DATE)
	@Column(name="O_KAI")
	private Date oKai;

	@Column(name="O_SHEN")
	private int oShen;

	@Column(name="O_TIME")
	private BigDecimal oTime;

	@Column(name="O_XSHEN")
	private String oXshen;
	
	@Column(name="O_Why")
	private String oWhy;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff;

	//bi-directional many-to-one association to KqOverworkXiang
	@OneToMany(mappedBy="kqOverwork")
	private List<KqOverworkXiang> kqOverworkXiangs;

	public KqOverwork() {
	}

	public int getOId() {
		return this.oId;
	}

	public void setOId(int oId) {
		this.oId = oId;
	}

	public String getOBou() {
		return this.oBou;
	}

	public void setOBou(String oBou) {
		this.oBou = oBou;
	}

	public Date getODate() {
		return this.oDate;
	}

	public void setODate(Date oDate) {
		this.oDate = oDate;
	}

	public Date getOJie() {
		return this.oJie;
	}

	public void setOJie(Date oJie) {
		this.oJie = oJie;
	}

	public Date getOKai() {
		return this.oKai;
	}

	public void setOKai(Date oKai) {
		this.oKai = oKai;
	}

	public int getOShen() {
		return this.oShen;
	}

	public void setOShen(int oShen) {
		this.oShen = oShen;
	}

	public BigDecimal getOTime() {
		return this.oTime;
	}

	public void setOTime(BigDecimal oTime) {
		this.oTime = oTime;
	}

	public String getOXshen() {
		return this.oXshen;
	}

	public void setOXshen(String oXshen) {
		this.oXshen = oXshen;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public String getoWhy() {
		return oWhy;
	}

	
	public Date getoSdate() {
		return oSdate;
	}

	public void setoSdate(Date oSdate) {
		this.oSdate = oSdate;
	}

	public void setoWhy(String oWhy) {
		this.oWhy = oWhy;
	}

	public List<KqOverworkXiang> getKqOverworkXiangs() {
		return this.kqOverworkXiangs;
	}

	public void setKqOverworkXiangs(List<KqOverworkXiang> kqOverworkXiangs) {
		this.kqOverworkXiangs = kqOverworkXiangs;
	}

	public KqOverworkXiang addKqOverworkXiang(KqOverworkXiang kqOverworkXiang) {
		getKqOverworkXiangs().add(kqOverworkXiang);
		kqOverworkXiang.setKqOverwork(this);

		return kqOverworkXiang;
	}

	public KqOverworkXiang removeKqOverworkXiang(KqOverworkXiang kqOverworkXiang) {
		getKqOverworkXiangs().remove(kqOverworkXiang);
		kqOverworkXiang.setKqOverwork(null);

		return kqOverworkXiang;
	}

}